import request from "@/utils/axios";
// 获取验证码/api/user/passport/sendCode/{phone}
export const reqSendCode = (phone) => {
  return request({
    method: "get",
    url: `/user/passport/sendCode/${phone}`,
  });
};

// 注册请求phone ,password,code

export const reqRegister = (data) => {
  return request({
    method: "post",
    url: "/user/passport/register",
    data,
  });
};

// 登入请求
// phone, password;
export const reqUserLogin = (phone, password) => {
  return request({
    method: "post",
    url: "/user/passport/login",
    data: {
      phone,
      password,
    },
  });
};

// 退出登录请求
export const loginOut = () => {
  return request({
    method: "get",
    url: "/user/passport/logout",
  });
};
